<!DOCTYPE html>
<html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml">
<head th:insert="/admin/common/head::css"></head>
<body>
<div th:insert="/admin/common/header::header" ></div>
<!--  main  -->
<div id = "app">
    <div class="container-fluid">
        <div class="row-fluid">
            <div th:insert="/admin/common/side::side" ></div>
            <!-- content -->
            <div style="display: flex; flex-direction: column">
                <div class="span10" id="content">
                    <div class="row-fluid">
                        <!-- block -->
                        <div class="block">
                            <div class="navbar navbar-inner block-header">
                                <a class="btn btn-default" th:href="@{/admin/diaocha/add.html}" role="button">增加</a>
                                <!--                <form method="post" th:action="@{/admin/user/page}">-->
                                <!--                  <input name="search" value=""/>-->
                                <!--                  <button type="submit" class="btn btn-primary"  >搜索</button>-->
                                <!--                </form>-->
                            </div>
                            <div class="block-content collapse in">
                                <div class="span12">
                                    <table class="table">
                                        <thead>
                                        <tr>
                                            <th>调查内容</th>
                                            <th>对应年纪</th>
                                            <th>对应专业</th>
                                            <th>对应班级</th>
                                            <th>发布时间</th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        <tr th:each = "diaocha : ${list}">
                                            <td th:text="${diaocha.message}"></td>
                                            <td th:text="${diaocha.grade != null ? diaocha.grade.name:''}"></td>
                                            <td th:text="${diaocha.major != null ? diaocha.major.name:''}"></td>
                                            <td th:text="${diaocha.bj != null ? diaocha.bj.name:''}"></td>
                                            <td th:text="${#dates.format(diaocha.date, 'yyyy-MM-dd')}"></td>
                                            <td>
                                                <!--            //这样可以拿到对应数据-->
                                                <a class="btn btn-default" th:href="@{/admin/diaocha/detail(id = ${diaocha.id})}" role="button">编辑</a>
                                                <a class="btn btn-default" th:href="@{/admin/diaocha/updatemessage(id = ${diaocha.id})}" role="button">更新职业发展</a>
                                            </td>
                                        </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                        <!-- /block -->
                    </div>
                </div>
                <!--        <div th:insert = "/admin/common/page::page"></div>-->
            </div>
            <!-- content -->
        </div>
    </div>
</div>
<!--  main  -->
</body>
<div th:insert="/admin/common/footer::js" ></div>
</html>